<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">

<!-- start: header -->
<header class="header" th:fragment="header">
    <div class="logo-container">
        <a th:href="@{../}" class="logo">
            <img th:src="@{images/logo.png}" height="35" alt="JSOFT Admin" />
        </a>
        <div class="visible-xs toggle-sidebar-left" data-toggle-class="sidebar-left-opened" data-target="html" data-fire-event="sidebar-left-opened">
            <i class="fa fa-bars" aria-label="Toggle sidebar"></i>
        </div>
    </div>

    <!-- start: search & user box -->
    <div class="header-right">

        <!-- 三个分隔线 -->
        <span class="separator"></span>
        <span class="separator"></span>
        <span class="separator"></span>


        <div id="userbox" class="userbox">
            <a th:if="${session.level.trim().equals('管理员') || session.level.trim().equals('超级管理员')}" href="#" data-toggle="dropdown">
                <figure class="profile-picture">
                    <img src="/static/images/!logged-user.jpg" th:alt="${session.object.getName()}" class="img-circle" data-lock-picture="/static/images/!logged-user.jpg" />
                </figure>
                <div class="profile-info" th:data-lock-name="${session.object.getName()}" th:data-lock-email="${session.object.getPhone()}">
                    <span class="name" th:text="${session.object.getName()}"></span>
                    <span class="role" th:text="${session.level}"></span>
                </div>

                <i class="fa custom-caret"></i>
            </a>
            <a th:if="${session.level.trim().equals('学员') || session.level.trim().equals('教练')}" href="#" data-toggle="dropdown">
                <figure class="profile-picture">
                    <img src="/static/images/!logged-user.jpg" th:alt="${session.user.getName()}" class="img-circle" data-lock-picture="/static/images/!logged-user.jpg" />
                </figure>

                <div class="profile-info" th:data-lock-name="${session.user.getName()}" th:data-lock-email="${session.user.getPhone()}">
                    <span class="name" th:text="${session.user.getName()}"></span>
                    <span class="role" th:text="${session.level}"></span>
                </div>

                <i class="fa custom-caret"></i>
            </a>

            <div class="dropdown-menu">
                <ul class="list-unstyled">
                    <li class="divider"></li>
                    <li>
                        <a role="menuitem" tabindex="-1" th:href="@{pages-user-profile.html}"><i class="fa fa-user"></i> 个人资料</a>
                    </li>
                    <li>
                        <a role="menuitem" tabindex="-1" th:href="@{sign_out}"><i class="fa fa-power-off"></i> 注销</a>
                    </li>
                </ul>
            </div>
        </div>
    </div>
    <!-- end: search & user box -->
</header>
<!-- end: header -->

<!-- 右侧边栏 Begin-->
<aside id="sidebar-right" class="sidebar-right" th:fragment="sidebar-right">
    <div class="nano">
        <div class="nano-content">
            <a href="#" class="mobile-close visible-xs">
                折叠 <i class="fa fa-chevron-right"></i>
            </a>

            <div class="sidebar-right-wrapper">

                <div class="sidebar-widget widget-calendar">
                    <h6>日历</h6>
                    <div data-plugin-datepicker data-plugin-skin="dark" ></div>

                    <ul>
                        <li>
                            <a id="time"></a>
                            <script th:inline="javascript">
                                function setTime(){
                                    var dt=new Date();
                                    var arr_week=["星期日","星期一","星期二","星期三","星期四","星期五","星期六"];
                                    var strWeek=arr_week[dt.getDay()];
                                    var strHour=dt.getHours();
                                    var strMinutes=dt.getMinutes();
                                    var strSeconds=dt.getSeconds();
                                    if (strMinutes<10) strMinutes="0"+strMinutes;
                                    if (strSeconds<10) strSeconds="0"+strSeconds;
                                    var strYear=dt.getFullYear()+"年";
                                    var strMonth=(dt.getMonth()+1)+"月";
                                    var strDay=dt.getDate()+"日";
                                    <!--var strTime=strHour+":"+strMinutes+":"+strSeconds;-->
                                    strTime=strHour+":"+strMinutes+":"+strSeconds;
                                    time.innerHTML=strYear+strMonth+strDay+" "+strTime+"  "+strWeek;
                                }
                                setInterval("setTime()",1000);
                            </script>
                        </li>
                    </ul>
                </div>

            </div>
        </div>
    </div>
</aside>
<!-- 右侧边栏 End -->

<!-- 左侧边栏--admin Begin-->
<aside id="sidebar-admin" class="sidebar-left" th:fragment="sidebar-admin">

    <div class="sidebar-header">
        <div class="sidebar-title">
            导航
        </div>
        <div class="sidebar-toggle hidden-xs" data-toggle-class="sidebar-left-collapsed" data-target="html" data-fire-event="sidebar-left-toggle">
            <i class="fa fa-bars" aria-label="Toggle sidebar"></i>
        </div>
    </div>

    <div class="nano">
        <div class="nano-content">
            <nav id="menu-admin" class="nav-main" role="navigation">
                <ul class="nav nav-main">
                    <!-- 主页 -->
                    <li class="nav-active">
                        <a th:href="@{/main.html}">
                            <i class="fa fa-home" aria-hidden="true"></i>
                            <span>主页</span>
                        </a>
                    </li>
                    <!-- 主页 End -->


                    <!-- 学员管理 -->
                    <li th:if="${(session.level.trim().equals('管理员') && session.l1.trim().equals('1')) || session.level.trim().equals('超级管理员')}" class="nav-parent">
                        <a>
                            <i class="fa fa-child" aria-hidden="true"></i>
                            <span>学员管理</span>
                        </a>
                        <ul class="nav nav-children">
                            <li>
                                <a href="/user_add">
                                    添加学员
                                </a>
                            </li>
                            <li>
                                <a href="/user_info">
                                    学员信息管理
                                </a>
                            </li>
                            <li>
                                <a href="/distribute_trainer">
                                    分配教练
                                </a>
                            </li>
                            <li>
                                <a href="/score_info">
                                    成绩管理
                                </a>
                            </li>
                        </ul>
                    </li>
                    <!-- 教练管理 -->
                    <li th:if="${(session.level.trim().equals('管理员') && session.l2.trim().equals('1')) || session.level.trim().equals('超级管理员')}" class="nav-parent">
                        <a>
                            <i class="fa fa-male" aria-hidden="true"></i>
                            <span>教练管理</span>
                        </a>
                        <ul class="nav nav-children">
                            <li>
                                <a href="/trainer_add">
                                    添加教练
                                </a>
                            </li>
                            <li>
                                <a href="/trainer_info">
                                    教练信息管理
                                </a>
                            </li>
                        </ul>
                    </li>
                    <!-- 管理员管理 -->
                    <li th:if="${session.level.trim().equals('超级管理员')}" class="nav-parent">
                        <a>
                            <i class="fa fa-user-md" aria-hidden="true"></i>
                            <span>管理员管理</span>
                        </a>
                        <ul class="nav nav-children">
                            <li>
                                <a href="/admin_add">
                                    添加管理员
                                </a>
                            </li>
                            <li>
                                <a href="/admin_info">
                                    管理员信息管理
                                </a>
                            </li>
                            <li>
                                <a href="/assign_permissions/null">
                                    分配权限
                                </a>
                            </li>
                        </ul>
                    </li>
                    <!-- 车辆管理 -->
                    <li th:if="${(session.level.trim().equals('管理员') && session.l3.trim().equals('1')) || session.level.trim().equals('超级管理员')}" class="nav-parent">
                        <a>
                            <i class="fa fa-car" aria-hidden="true"></i>
                            <span>车辆管理</span>
                        </a>
                        <ul class="nav nav-children">
                            <li>
                                <a href="/car_add">
                                    添加车辆
                                </a>
                            </li>
                            <li>
                                <a href="/car_info">
                                    车辆信息管理
                                </a>
                            </li>
                        </ul>
                    </li>
                    <!-- 查看已删除的信息 -->
                    <li th:if="${session.level.trim().equals('超级管理员')}" class="nav-parent">
                        <a>
                            <i class="fa fa-bitbucket" aria-hidden="true"></i>
                            <span>查看已删除的信息</span>
                        </a>
                        <ul class="nav nav-children">
                            <li>
                                <a href="/deleted_user">
                                    学员信息
                                </a>
                            </li>
                            <li>
                                <a href="/deleted_trainer">
                                    教练信息
                                </a>
                            </li>
                            <li>
                                <a href="/deleted_admin">
                                    管理员信息
                                </a>
                            </li>
                            <li>
                                <a href="/deleted_car">
                                    车辆信息
                                </a>
                            </li>
                        </ul>
                    </li>
                    <!-- 培训时间段 -->
                    <li th:if="${session.level.trim().equals('超级管理员')}">
                        <a href="/timeSlot_info">
                            <i class="fa fa-clock-o" aria-hidden="true"></i>
                            <span>培训时间段</span>
                        </a>
                    </li>
                    <!-- 信息统计分析 -->
                    <li th:if="${(session.level.trim().equals('管理员') && session.l4.trim().equals('1')) || session.level.trim().equals('超级管理员')}">
                        <a href="">
                            <i class="fa fa-search" aria-hidden="true"></i>
                            <span>信息统计分析</span>
                        </a>
                    </li>
                    <!-- 查看信息 -->
                    <li th:if="${session.level.trim().equals('教练')}" class="nav-parent">
                        <a>
                            <i class="fa fa-database" aria-hidden="true"></i>
                            <span>查看信息</span>
                        </a>
                        <ul class="nav nav-children">
                            <li>
                                <a href="/Trainer_userInfo">
                                    学员信息
                                </a>
                            </li>
                            <li>
                                <a href="/Trainer_carInfo">
                                    车辆信息
                                </a>
                            </li>
                        </ul>
                    </li>
                    <!-- 查看预约的学员 -->
                    <li th:if="${session.level.trim().equals('教练')}">
                        <a href="/trainer_appointmentInfo">
                            <i class="fa fa-calendar-o" aria-hidden="true"></i>
                            <span>查看预约的学员</span>
                        </a>
                    </li>
                    <!-- 预约报名练车 -->
                    <li th:if="${session.level.trim().equals('学员')}" class="nav nav-parent">
                        <a>
                            <i class="fa fa-cab" aria-hidden="true"></i>
                            <span>练车管理</span>
                        </a>
                        <ul class="nav nav-children">
                            <li>
                                <a href="/exercise_carAppointmentInfo">
                                    预约报名
                                </a>
                            </li>
                            <li>
                                <a href="/appointment_Info">
                                    查看预约信息
                                </a>
                            </li>
                        </ul>
                    </li>
                    <!-- 成绩信息 -->
                    <li th:if="${session.level.trim().equals('学员')}">
                        <a href="/user_score_info">
                            <i class="fa fa-joomla" aria-hidden="true"></i>
                            <span>查看成绩</span>
                        </a>
                    </li>
                    <!-- 缴费信息 -->
                    <li th:if="${session.level.trim().equals('学员')}">
                        <a href="">
                            <i class="fa fa-money" aria-hidden="true"></i>
                            <span>缴费信息</span>
                        </a>
                    </li>
                    <!-- 打开一个新页面 -->
                    <li>
                        <a href="" target="_blank">
                            <i class="fa fa-external-link" aria-hidden="true"></i>
                            <span>打开一个新页面 <em class="not-included">(新标签页)</em></span>
                        </a>
                    </li>
                </ul>
            </nav>

            <hr class="separator" />
        </div>

    </div>

</aside>
<!-- 左侧边栏--admin End-->

</html>